package com.orange.core.pojo.enums;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

@RequiredArgsConstructor
@Getter
public enum EGender implements ConvertableEnum {

    MALE(0, "男"),
    FEMALE(1, "女"),
    ;

    private final int value;
    private final String name;

    public static String getName(int value) {
        for (EGender gender : values()) {
            if (gender.getValue() == value) {
                return gender.getName();
            }
        }
        return null;
    }
}
